﻿using System;
namespace CXedu.Model
{
	///<summary>
	///
	///</summary>
	public class NewsClass : ModelBase<int>
	{
		#region 成员字段
		
		private string _name = String.Empty;
		private int _pId = default(Int32);
		
		#endregion
		
		#region 构造方法
		
		public NewsClass() { }
		
		#endregion
		
		#region 成员方法
		
		public override int GetHashCode()
		{
			System.Text.StringBuilder sb = new System.Text.StringBuilder();
			sb.Append(this.GetType().FullName);
			sb.Append(_name);
			sb.Append(_pId);
			return sb.ToString().GetHashCode();
		}
		
		#endregion
		
		#region 成员属性
		
		///<summary>
		///分类名
		///</summary>
		public string Name
		{
			get
			{
				return _name;
			}
			set
			{
				_name = value;
			}
		}
		///<summary>
		///分类父级ID
		///</summary>
		public int PId
		{
			get
			{
				return _pId;
			}
			set
			{
				_pId = value;
			}
		}
		
        /// <summary>
        /// 自定义查询条件
        /// </summary>
        public string CustomWhere { get; set; }
		
		#endregion
	}
		
	public static class NewsClassHash
	{
		public const string TopNum = "TopNum";
		public const string OrderField = "OrderField";
		public const string OrderDirection = "OrderDirection";
		public const string Id = "Id";
		public const string Name = "Name";
		public const string PId = "PId";
		
        public const string CustomWhere = "CustomWhere";
	}
}